API: Add prop=redirects and list=allredirects
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 30 Dec 2013 21:57:27 +0000 (16:57 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 24 Feb 2014 16:01:44 +0000 (11:01 -0500)
commit0ce8a2ac126d7a8d9f50201a18f2e8b5a65825a6
tree7fb6ca8f3f32c1f35a9f4c31225c42ccafb38051
parentd97a7d33882dc3bb3f43c84b9719a33dae4d8224
API: Add prop=redirects and list=allredirects

While redirects can be sort-of queried using list=backlinks with
blfilterredir=redirects, we can get more accurate results with a module
dedicated to this purpose. We can also get the fragment of the redirect
without having to load the content of the redirect page and parse it.

I'm a bit surprised I was able to put together a query for this that
will work as a prop module. Or did I overlook something?

And then we may as well add the corresponding list=allredirects, to work
like alllinks, allfileusages, and alltransclusions.

Bug: 57057
Change-Id: I81082aa9e4e3a3b2c66cc4f9970a97eed83a6a4f
RELEASE-NOTES-1.23
includes/AutoLoader.php
includes/api/ApiQuery.php
includes/api/ApiQueryAllLinks.php
includes/api/ApiQueryRedirects.php [new file with mode: 0644]